package cz.muni.fi.pa165.pokemon.service;

import cz.muni.fi.pa165.pokemon.dto.BadgeTO;
import cz.muni.fi.pa165.pokemon.dto.StadiumTO;
import java.util.List;

/**
 * Service class for stadiums. Provides basic functionality of CRUD 
 * and some find methods. It uses transfer objects.
 * 
 * @author Peter Mravec
 */
public interface StadiumService {
    
    /**
     * Creates stadium from transfer object.
     * 
     * @param stadium Stadium transfer object to create
     * @throws IllegalArgumentException when stadium is null or its id is not null
     */
    void create(StadiumTO stadium);
    
    /**
     * Returns stadium (transfer object) that has given id.
     * 
     * @param id Id of the stadium
     * @return Stadium with given id
     * @throws IllegalArgumentException when id is null
     */
    StadiumTO get(Long id);
    
    /**
     * Updates stadium from transfer object.
     * 
     * @param stadium Transfer object of stadium to update
     * @throws IllegalArgumentException when stadium is null or its id is null
     */
    void update(StadiumTO stadium);
    
    /**
     * Removes stadium represented by its transfer object.
     * 
     * @param stadium Transfer object of stadium to remove
     * @throws IllegalArgumentException when stadium is null or its id is null
     */
    void remove(StadiumTO stadium);
    
    /**
     * Returns all stadiums as a list of transfer objects.
     * 
     * @return List of stadiums transfer objects
     */
    List<StadiumTO> findAll();
    
    /**
     * Returns all stadiums with given name
     * 
     * @param badge Badge of the service(s) to be found.
     * @return List of stadiums transfer objects with given name
     * @throws IllegalArgumentException when badge is null
     */
    List<StadiumTO> findByBadge(BadgeTO badge);
}
